-
Notifications
You must be signed in to change notification settings - Fork 311
Migrate instrumentations to Context API #9358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Code coverage: total 57.34%, base diff -0.00%, patch 80.77% (view details) This comment will be updated automatically if new data arrives.🔗 Commit SHA: 364cab5 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 13 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~364cab503d, baseline=1.53.0-SNAPSHOT~f15598ae39
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.044 s) : 0, 1043804
Total [baseline] (8.612 s) : 0, 8611931
Agent [candidate] (1.045 s) : 0, 1044628
Total [candidate] (8.579 s) : 0, 8578564
section iast
Agent [baseline] (1.176 s) : 0, 1176328
Total [baseline] (9.325 s) : 0, 9324512
Agent [candidate] (1.173 s) : 0, 1173327
Total [candidate] (9.329 s) : 0, 9329428
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~364cab503d, baseline=1.53.0-SNAPSHOT~f15598ae39
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.433 ms) : 0, 1433
crashtracking [candidate] (1.432 ms) : 0, 1432
BytebuddyAgent [baseline] (731.358 ms) : 0, 731358
BytebuddyAgent [candidate] (730.157 ms) : 0, 730157
GlobalTracer [baseline] (241.772 ms) : 0, 241772
GlobalTracer [candidate] (241.529 ms) : 0, 241529
AppSec [baseline] (30.147 ms) : 0, 30147
AppSec [candidate] (30.383 ms) : 0, 30383
Debugger [baseline] (6.017 ms) : 0, 6017
Debugger [candidate] (6.041 ms) : 0, 6041
Remote Config [baseline] (650.053 µs) : 0, 650
Remote Config [candidate] (652.046 µs) : 0, 652
Telemetry [baseline] (11.44 ms) : 0, 11440
Telemetry [candidate] (13.54 ms) : 0, 13540
section iast
crashtracking [baseline] (1.426 ms) : 0, 1426
crashtracking [candidate] (1.411 ms) : 0, 1411
BytebuddyAgent [baseline] (849.182 ms) : 0, 849182
BytebuddyAgent [candidate] (847.82 ms) : 0, 847820
GlobalTracer [baseline] (232.43 ms) : 0, 232430
GlobalTracer [candidate] (231.587 ms) : 0, 231587
AppSec [baseline] (28.37 ms) : 0, 28370
AppSec [candidate] (26.512 ms) : 0, 26512
Debugger [baseline] (7.606 ms) : 0, 7606
Debugger [candidate] (5.701 ms) : 0, 5701
Remote Config [baseline] (583.725 µs) : 0, 584
Remote Config [candidate] (584.511 µs) : 0, 585
Telemetry [baseline] (9.036 ms) : 0, 9036
Telemetry [candidate] (8.253 ms) : 0, 8253
IAST [baseline] (26.796 ms) : 0, 26796
IAST [candidate] (30.637 ms) : 0, 30637
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~364cab503d, baseline=1.53.0-SNAPSHOT~f15598ae39
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.043 s) : 0, 1042782
Total [baseline] (10.718 s) : 0, 10717880
Agent [candidate] (1.048 s) : 0, 1048011
Total [candidate] (10.745 s) : 0, 10745408
section appsec
Agent [baseline] (1.22 s) : 0, 1219665
Total [baseline] (10.737 s) : 0, 10736677
Agent [candidate] (1.221 s) : 0, 1220749
Total [candidate] (10.787 s) : 0, 10786546
section iast
Agent [baseline] (1.178 s) : 0, 1177923
Total [baseline] (10.878 s) : 0, 10878330
Agent [candidate] (1.187 s) : 0, 1186734
Total [candidate] (10.929 s) : 0, 10928950
section profiling
Agent [baseline] (1.195 s) : 0, 1194802
Total [baseline] (10.886 s) : 0, 10886313
Agent [candidate] (1.194 s) : 0, 1194475
Total [candidate] (10.906 s) : 0, 10905563
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~364cab503d, baseline=1.53.0-SNAPSHOT~f15598ae39
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.422 ms) : 0, 1422
crashtracking [candidate] (1.428 ms) : 0, 1428
BytebuddyAgent [baseline] (730.913 ms) : 0, 730913
BytebuddyAgent [candidate] (732.686 ms) : 0, 732686
GlobalTracer [baseline] (241.47 ms) : 0, 241470
GlobalTracer [candidate] (242.596 ms) : 0, 242596
AppSec [baseline] (30.018 ms) : 0, 30018
AppSec [candidate] (30.242 ms) : 0, 30242
Debugger [baseline] (6.018 ms) : 0, 6018
Debugger [candidate] (6.001 ms) : 0, 6001
Remote Config [baseline] (638.271 µs) : 0, 638
Remote Config [candidate] (645.028 µs) : 0, 645
Telemetry [baseline] (11.361 ms) : 0, 11361
Telemetry [candidate] (13.42 ms) : 0, 13420
section appsec
crashtracking [baseline] (1.428 ms) : 0, 1428
crashtracking [candidate] (1.423 ms) : 0, 1423
BytebuddyAgent [baseline] (753.066 ms) : 0, 753066
BytebuddyAgent [candidate] (753.785 ms) : 0, 753785
GlobalTracer [baseline] (235.097 ms) : 0, 235097
GlobalTracer [candidate] (235.173 ms) : 0, 235173
AppSec [baseline] (167.911 ms) : 0, 167911
AppSec [candidate] (167.298 ms) : 0, 167298
Debugger [baseline] (7.302 ms) : 0, 7302
Debugger [candidate] (8.735 ms) : 0, 8735
Remote Config [baseline] (623.154 µs) : 0, 623
Remote Config [candidate] (628.713 µs) : 0, 629
Telemetry [baseline] (9.813 ms) : 0, 9813
Telemetry [candidate] (9.204 ms) : 0, 9204
IAST [baseline] (23.479 ms) : 0, 23479
IAST [candidate] (23.429 ms) : 0, 23429
section iast
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.44 ms) : 0, 1440
BytebuddyAgent [baseline] (850.545 ms) : 0, 850545
BytebuddyAgent [candidate] (857.551 ms) : 0, 857551
GlobalTracer [baseline] (232.81 ms) : 0, 232810
GlobalTracer [candidate] (234.104 ms) : 0, 234104
AppSec [baseline] (26.509 ms) : 0, 26509
AppSec [candidate] (28.475 ms) : 0, 28475
Debugger [baseline] (6.6 ms) : 0, 6600
Debugger [candidate] (8.126 ms) : 0, 8126
Remote Config [baseline] (583.994 µs) : 0, 584
Remote Config [candidate] (577.37 µs) : 0, 577
Telemetry [baseline] (8.364 ms) : 0, 8364
Telemetry [candidate] (8.336 ms) : 0, 8336
IAST [baseline] (30.0 ms) : 0, 30000
IAST [candidate] (27.043 ms) : 0, 27043
section profiling
ProfilingAgent [baseline] (108.923 ms) : 0, 108923
ProfilingAgent [candidate] (108.924 ms) : 0, 108924
crashtracking [baseline] (1.399 ms) : 0, 1399
crashtracking [candidate] (1.394 ms) : 0, 1394
BytebuddyAgent [baseline] (761.015 ms) : 0, 761015
BytebuddyAgent [candidate] (761.417 ms) : 0, 761417
GlobalTracer [baseline] (221.865 ms) : 0, 221865
GlobalTracer [candidate] (222.057 ms) : 0, 222057
AppSec [baseline] (30.017 ms) : 0, 30017
AppSec [candidate] (29.998 ms) : 0, 29998
Debugger [baseline] (6.301 ms) : 0, 6301
Debugger [candidate] (6.241 ms) : 0, 6241
Remote Config [baseline] (687.212 µs) : 0, 687
Remote Config [candidate] (698.762 µs) : 0, 699
Telemetry [baseline] (15.27 ms) : 0, 15270
Telemetry [candidate] (14.385 ms) : 0, 14385
Profiling [baseline] (109.549 ms) : 0, 109549
Profiling [candidate] (109.585 ms) : 0, 109585
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~364cab503d, baseline=1.53.0-SNAPSHOT~f15598ae39
dateFormat X
axisFormat %s
section baseline
no_agent (37.115 ms) : 36811, 37419
. : milestone, 37115,
appsec (48.902 ms) : 48478, 49327
. : milestone, 48902,
code_origins (45.262 ms) : 44891, 45633
. : milestone, 45262,
iast (46.079 ms) : 45671, 46486
. : milestone, 46079,
profiling (47.761 ms) : 47322, 48199
. : milestone, 47761,
tracing (44.247 ms) : 43869, 44626
. : milestone, 44247,
section candidate
no_agent (36.339 ms) : 36054, 36625
. : milestone, 36339,
appsec (48.359 ms) : 47916, 48802
. : milestone, 48359,
code_origins (45.286 ms) : 44902, 45670
. : milestone, 45286,
iast (44.455 ms) : 44063, 44847
. : milestone, 44455,
profiling (47.399 ms) : 46968, 47831
. : milestone, 47399,
tracing (44.56 ms) : 44176, 44944
. : milestone, 44560,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~364cab503d, baseline=1.53.0-SNAPSHOT~f15598ae39
dateFormat X
axisFormat %s
section baseline
no_agent (4.298 ms) : 4250, 4346
. : milestone, 4298,
iast (9.332 ms) : 9182, 9483
. : milestone, 9332,
iast_FULL (14.079 ms) : 13796, 14362
. : milestone, 14079,
iast_GLOBAL (10.341 ms) : 10163, 10518
. : milestone, 10341,
profiling (8.602 ms) : 8470, 8735
. : milestone, 8602,
tracing (7.629 ms) : 7517, 7741
. : milestone, 7629,
section candidate
no_agent (4.319 ms) : 4269, 4369
. : milestone, 4319,
iast (9.531 ms) : 9366, 9696
. : milestone, 9531,
iast_FULL (14.521 ms) : 14233, 14810
. : milestone, 14521,
iast_GLOBAL (10.086 ms) : 9899, 10274
. : milestone, 10086,
profiling (8.654 ms) : 8514, 8794
. : milestone, 8654,
tracing (7.403 ms) : 7298, 7509
. : milestone, 7403,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~364cab503d, baseline=1.53.0-SNAPSHOT~f15598ae39
dateFormat X
axisFormat %s
section baseline
no_agent (15.635 s) : 15635000, 15635000
. : milestone, 15635000,
appsec (14.879 s) : 14879000, 14879000
. : milestone, 14879000,
iast (18.279 s) : 18279000, 18279000
. : milestone, 18279000,
iast_GLOBAL (18.276 s) : 18276000, 18276000
. : milestone, 18276000,
profiling (15.487 s) : 15487000, 15487000
. : milestone, 15487000,
tracing (15.113 s) : 15113000, 15113000
. : milestone, 15113000,
section candidate
no_agent (15.278 s) : 15278000, 15278000
. : milestone, 15278000,
appsec (14.968 s) : 14968000, 14968000
. : milestone, 14968000,
iast (18.187 s) : 18187000, 18187000
. : milestone, 18187000,
iast_GLOBAL (17.875 s) : 17875000, 17875000
. : milestone, 17875000,
profiling (15.556 s) : 15556000, 15556000
. : milestone, 15556000,
tracing (15.078 s) : 15078000, 15078000
. : milestone, 15078000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~364cab503d, baseline=1.53.0-SNAPSHOT~f15598ae39
dateFormat X
axisFormat %s
section baseline
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (2.401 ms) : 2351, 2451
. : milestone, 2401,
iast (2.197 ms) : 2134, 2260
. : milestone, 2197,
iast_GLOBAL (2.234 ms) : 2171, 2297
. : milestone, 2234,
profiling (2.04 ms) : 1990, 2091
. : milestone, 2040,
tracing (2.017 ms) : 1968, 2067
. : milestone, 2017,
section candidate
no_agent (1.471 ms) : 1460, 1483
. : milestone, 1471,
appsec (3.651 ms) : 3433, 3869
. : milestone, 3651,
iast (2.193 ms) : 2130, 2255
. : milestone, 2193,
iast_GLOBAL (2.234 ms) : 2170, 2297
. : milestone, 2234,
profiling (2.48 ms) : 2312, 2647
. : milestone, 2480,
tracing (2.023 ms) : 1974, 2073
. : milestone, 2023,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did an overall review, particularly focusing on the AppSec instrumentations, looks good to me.
import net.bytebuddy.asm.Advice; | ||
|
||
public class HTTPPluginAdvice { | ||
|
||
@Advice.OnMethodEnter(suppress = Throwable.class) | ||
public static AgentScope onEnter(@Advice.Argument(value = 2) final Object serverTransaction) { | ||
final AgentSpan span = startSpan(DECORATE.spanName()).setMeasured(true); | ||
final AgentSpan span = startSpan("axway-api", DECORATE.spanName()).setMeasured(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't verify axway-api
is the correct integration name just based on the diff, but worth a double check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is:
Line 18 in e8df8a0
super("axway-api"); |
Not sure why I fixed this call in particular 🤷 Found a warning while reading the code and can't help myself 😅 But it's more to the IDM team to fix it.
What Does This Do
Migrate
HttpServerDecorator.onRequest()
to the Context API.In particular, get rid of the duplicate version using
AgentSpan.Extracted
instead.This lead to overridden decorators no longer being called when moved to the
Context
based version -- unclear how tests did not catch it.Motivation
Move instrumentation API to the Context API to decouple products and move toward better performance.
Additional Notes
Follow up PR of #9211
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: LANGPLAT-680